<?php
class Software_Controller_Software {
	
	public $template;
	
	public function main(array $getVars, array $postVars){
		
		if(isset($getVars['page'])){
			$softwareModel = new Software_Model_Singlesoftware;
			$article = $softwareModel->getArticle($getVars, $postVars);
			$this->template = "./software/views/singlesoftware.php";
		}
		else {
			$softwareModel = new Software_Model_Softwarelist;
			$article = $softwareModel->getSoftwareList($getVars);
			$this->template = "./software/views/softwarelist.php";
		}
		$view = new Core_Model_View($this->template);
		$view->assign('article', $article);
	}
	
}